home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1314_finding_menu_id.rtf < prev    next >
Text File  |  1995-06-12  |  911b  |  33 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;\f3\fmodern Ohlfs;}
  2. \paperw12740
  3. \paperh8500
  4. \margl120
  5. \margr120
  6. {\colortbl;\red84\green84\blue84;\red83\green83\blue83;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  How do I find the id of a menu?\
  8. \
  9. A:  To obtain the menu id of the main menu use this:\
  10. \
  11.  
  12. \f1\fs24     [NXApp mainMenu]\
  13. \
  14.  
  15. \f0\fs28 There is no direct way to find the id of other menus unless you know the menu cell  which corresponds to the menu in question.  Then you can use the ActionCell method
  16. \f1\fs24  target
  17. \f0\fs28  which returns the target of the cell (i.e., its menu id).  This method can be used to find any menu id.  It is especially useful for finding the id of a submenu.\
  18. \
  19. Example:\
  20. \
  21.     
  22. \f1\fs24 myMenuId = [myMenuCell target];\
  23.     
  24. \f0\fs28 \
  25.  
  26. \f1\fs24     
  27. \f0\fs28 \
  28. QA619\
  29. \
  30. Valid for 1.0, 2.0, 3.0\
  31. \
  32.  
  33.